/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ongmanager.model;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author wbettencourt
 */
@Embeddable
public class OngDocumentoPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "IdOng")
    private int idOng;
    @Basic(optional = false)
    @Column(name = "IdDocumento")
    private int idDocumento;

    public OngDocumentoPK() {
    }

    public OngDocumentoPK(int idOng, int idDocumento) {
        this.idOng = idOng;
        this.idDocumento = idDocumento;
    }

    public int getIdOng() {
        return idOng;
    }

    public void setIdOng(int idOng) {
        this.idOng = idOng;
    }

    public int getIdDocumento() {
        return idDocumento;
    }

    public void setIdDocumento(int idDocumento) {
        this.idDocumento = idDocumento;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idOng;
        hash += (int) idDocumento;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof OngDocumentoPK)) {
            return false;
        }
        OngDocumentoPK other = (OngDocumentoPK) object;
        if (this.idOng != other.idOng) {
            return false;
        }
        if (this.idDocumento != other.idDocumento) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "ongmanager.model.OngDocumentoPK[ idOng=" + idOng + ", idDocumento=" + idDocumento + " ]";
    }
    
}
